﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace ExBug
{
    public partial class InitializareBugetFrm : FrmCard
    {
        public InitializareBugetFrm(ModuleClass mInfo)
            : base(mInfo)
        {
            InitializeComponent();
            workConnString = "ESRPConnectionString";
        }

        private void InitializareBugetFrm_Load(object sender, EventArgs e)
        {
            AddButton("Genereaza", global::ExBug.Properties.Resources.Folder_Options, Genereaza, ToolStripItemAlignment.Right, true);
        }

        private void Genereaza(object sender, EventArgs e)
        {
            /*SqlCommand cmd = new SqlCommand("Init_Buget",DeschideConexiune(workConnString));
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("IDJurnal",JurnalCB.SelectedValue));
            cmd.Parameters.Add(new SqlParameter("DataStart", DataStartDTP.Value));
            cmd.Parameters.Add(new SqlParameter("DataEnd", DataEndDTP.Value));
            cmd.Parameters.Add(new SqlParameter("ArtStart",startArtRTB.Text));
            cmd.Parameters.Add(new SqlParameter("ArtEnd",endArtRTB.Text));
            cmd.Parameters.Add(new SqlParameter("CodUnitate", ModuleInfo.CodUnitate));
            Int32 ret =cmd.ExecuteNonQuery();
            InchideConexiune(cmd.Connection);
            MessageBox.Show("Au fost generate " + ret.ToString() + " inregistrari!",
                        "Info",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Information);*/
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
